package com.choosefine.it.basedata.dao;

import java.util.List;
import java.util.Map;

import com.choosefine.it.basedata.model.CompanyInfo;
import com.choosefine.it.basedata.model.vo.AffiliatedUnitVO;
import com.choosefine.it.basedata.model.vo.CompanyInfoFindVO;
import com.choosefine.it.basedata.model.vo.CompanyNameFindVO;
import com.github.pagehelper.Page;


/**
 * 公司详情映射
 * @author guwenwei
 * 2016/11/15
 */
public interface CompanyInfoMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(CompanyInfo record);

	int insertSelective(CompanyInfo record);

	int updateByPrimaryKeySelective(CompanyInfo record);

	int updateByPrimaryKey(CompanyInfo record);

	CompanyInfo findByUserCode(String userCode);
	
	String findHeadImageByUserCode(String userCode);

	int deleteByUserCode(Map<String,Object> userCode);

	List<CompanyInfo> selectAll();
	
	Page<CompanyInfoFindVO> findCompanyByRole(Map<String,Object> params);
	
	List<CompanyInfo> selectCompanyInfoBy (Map<String,Object>map);
	
	CompanyInfo selectById(Integer id);
	
	String selectUseCodeByName(String companyName);

	Page<CompanyNameFindVO> findCompanyByUserCode(String userCode);

	Page<CompanyNameFindVO> findCompanyByManagerUserCode(String managerUserCode);

	Page<AffiliatedUnitVO> findAffiliatedUnits(String userCode);
	
}
